package com.treasure.mall.biz.vo.life;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

/**
 *
 * <p>
 * +---------------------------------------------------------
 * * @package: com.treasure.mall.biz.vo.life
 * * @author: guomw (guomwchen@foxmail.com)
 * * @date: 2020/10/16 5:35 下午
 * * @since: V1.0.0
 * +---------------------------------------------------------
 * 注意：本内容仅限于内部传阅，禁止外泄以及用于其他的商业目的
 * 
 */
@Data
@NoArgsConstructor
public class ShopCityVO {

    private Integer id;
    private String name;
    private List<ShopCityVO> children;


    public ShopCityVO(Integer code, String cityName) {
        this.id = code;
        this.name = cityName;
    }

    public List<ShopCityVO> getChildren() {
        if (this.children == null) {
            return new ArrayList<>();
        }
        return this.children;
    }

}
